home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
firewo1a
/
firework.frm
< prev
next >
Wrap
Text File
|
1999-09-12
|
23KB
|
539 lines
VERSION 5.00
Begin VB.Form FireWorksFrm
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 0
ClientTop = 0
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
WindowState = 2 'Maximized
Begin VB.Timer Timer1
Interval = 1
Left = 2040
Top = 1440
End
End
Attribute VB_Name = "FireWorksFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Name: FireWorks
'Author: InfraRed
'Comments: Have fun with my little fireworks
'source code. You can use it for a screen saver
'or just some cool opening for a program. If you
'can, just give me a little credit. Good luck
'with my source code!
Dim FirePosX(999) As Long 'The X position for the fireworks
Dim ExplodePosY(999) As Long 'This is where they will explode
Dim CurY(999) As Long 'The Y position for the fireworks
Dim FireColorR(999) As Integer 'The red in all of the fireworks' colors
Dim FireColorG(999) As Integer 'The green in all of the fireworks' colors
Dim FireColorB(999) As Integer 'The blue in all of the fireworks' colors
Dim Explode(999) As Boolean 'This tells the program if the fireworks are exploding
Dim Speed(999) As Integer 'This is the speed that the fireworks move at
'Here are the X and Y positions for the exploding firework 'debree'
Dim Explode1X(999) As Long
Dim Explode1Y(999) As Long
Dim Explode2X(999) As Long
Dim Explode2Y(999) As Long
Dim Explode3X(999) As Long
Dim Explode3Y(999) As Long
Dim Explode4X(999) As Long
Dim Explode4Y(999) As Long
Dim Explode5X(999) As Long
Dim Explode5Y(999) As Long
Dim Explode6X(999) As Long
Dim Explode6Y(999) As Long
Dim Explode7X(999) As Long
Dim Explode7Y(999) As Long
Dim Explode8X(999) As Long
Dim Explode8Y(999) As Long
Dim Explode9X(999) As Long
Dim Explode9Y(999) As Long
Dim Explode10X(999) As Long
Dim Explode10Y(999) As Long
Dim Explode11X(999) As Long
Dim Explode11Y(999) As Long
Dim Explode12X(999) As Long
Dim Explode12Y(999) As Long
Dim Explode13X(999) As Long
Dim Explode13Y(999) As Long
Dim Explode14X(999) As Long
Dim Explode14Y(999) As Long
Dim Explode15X(999) As Long
Dim Explode15Y(999) As Long
Dim Explode16X(999) As Long
Dim Explode16Y(999) As Long
Dim Explode17X(999) As Long
Dim Explode17Y(999) As Long
Dim Explode18X(999) As Long
Dim Explode18Y(999) As Long
Dim Explode19X(999) As Long
Dim Explode19Y(999) As Long
Dim Explode20X(999) As Long
Dim Explode20Y(999) As Long
Dim Explode21X(999) As Long
Dim Explode21Y(999) As Long
Dim Explode22X(999) As Long
Dim Explode22Y(999) As Long
Dim Explode23X(999) As Long
Dim Explode23Y(999) As Long
Dim Explode24X(999) As Long
Dim Explode24Y(999) As Long
Dim Explode25X(999) As Long
Dim Explode25Y(999) As Long
Dim Explode26X(999) As Long
Dim Explode26Y(999) As Long
Dim Explode27X(999) As Long
Dim Explode27Y(999) As Long
Dim Explode28X(999) As Long
Dim Explode28Y(999) As Long
Dim Explode29X(999) As Long
Dim Explode29Y(999) As Long
Dim Explode30X(999) As Long
Dim Explode30Y(999) As Long
Dim Explode31X(999) As Long
Dim Explode31Y(999) As Long
Dim Explode32X(999) As Long
Dim Explode32Y(999) As Long
Dim Explode33X(999) As Long
Dim Explode33Y(999) As Long
Dim Explode34X(999) As Long
Dim Explode34Y(999) As Long
Dim Explode35X(999) As Long
Dim Explode35Y(999) As Long
Dim Explode36X(999) As Long
Dim Explode36Y(999) As Long
Dim Explode37X(999) As Long
Dim Explode37Y(999) As Long
Dim Explode38X(999) As Long
Dim Explode38Y(999) As Long
Dim Explode39X(999) As Long
Dim Explode39Y(999) As Long
Dim Explode40X(999) As Long
Dim Explode40Y(999) As Long
Dim Explode41X(999) As Long
Dim Explode41Y(999) As Long
Dim Explode42X(999) As Long
Dim Explode42Y(999) As Long
Dim Explode43X(999) As Long
Dim Explode43Y(999) As Long
Dim Explode44X(999) As Long
Dim Explode44Y(999) As Long
Dim Explode45X(999) As Long
Dim Explode45Y(999) As Long
Dim Explode46X(999) As Long
Dim Explode46Y(999) As Long
Dim Explode47X(999) As Long
Dim Explode47Y(999) As Long
Dim Explode48X(999) As Long
Dim Explode48Y(999) As Long
Dim Explode49X(999) As Long
Dim Explode49Y(999) As Long
Dim Explode50X(999) As Long
Dim Explode50Y(999) As Long
Dim ExplodeStep(999) As Integer
Dim FadeStep(999) As Integer
Public Sub Restart(Pos As Integer) 'This will clear and restart a firework after it has exploded
Randomize Timer
'This will clear all of the explosion 'debree'
BlankExplosion Pos
'This will reset all of the firework settings
FirePosX(Pos) = Int(((Screen.Width - 1) - 1 + 1) * Rnd + 1)
CurY(Pos) = Screen.Height
FadeStep(Pos) = 0
ExplodePosY(Pos) = Int((1 - (Screen.Height * (2 / 3)) + 1) * Rnd) + (Screen.Height / 2) + (Screen.Height * ((2 / 3) / 3))
FireColorR(Pos) = Int((255 - 1) * Rnd)
FireColorG(Pos) = Int((255 - 1) * Rnd)
FireColorB(Pos) = Int((255 - 1) * Rnd)
Speed(Pos) = Int((100 - 50 + 1) * Rnd + 50)
Explode(Pos) = False
ExplodeStep(Pos) = 0
End Sub
Public Sub DrawExplode(Pos As Integer)
If ExplodeStep(Pos) = 0 Then
'This will put all of the explosion 'debree' in a starting place
Explode1X(Pos) = FirePosX(Pos)
Explode1Y(Pos) = CurY(Pos)
Explode2X(Pos) = FirePosX(Pos)
Explode2Y(Pos) = CurY(Pos)
Explode3X(Pos) = FirePosX(Pos)
Explode3Y(Pos) = CurY(Pos)
Explode4X(Pos) = FirePosX(Pos)
Explode4Y(Pos) = CurY(Pos)
Explode5X(Pos) = FirePosX(Pos)
Explode5Y(Pos) = CurY(Pos)
Explode6X(Pos) = FirePosX(Pos)
Explode6Y(Pos) = CurY(Pos)
Explode7X(Pos) = FirePosX(Pos)
Explode7Y(Pos) = CurY(Pos)
Explode8X(Pos) = FirePosX(Pos)
Explode8Y(Pos) = CurY(Pos)
Explode9X(Pos) = FirePosX(Pos)
Explode9Y(Pos) = CurY(Pos)
Explode10X(Pos) = FirePosX(Pos)
Explode10Y(Pos) = CurY(Pos)
Explode11X(Pos) = FirePosX(Pos)
Explode11Y(Pos) = CurY(Pos)
Explode12X(Pos) = FirePosX(Pos)
Explode12Y(Pos) = CurY(Pos)
Explode13X(Pos) = FirePosX(Pos)
Explode13Y(Pos) = CurY(Pos)
Explode14X(Pos) = FirePosX(Pos)
Explode14Y(Pos) = CurY(Pos)
Explode15X(Pos) = FirePosX(Pos)
Explode15Y(Pos) = CurY(Pos)
Explode16X(Pos) = FirePosX(Pos)
Explode16Y(Pos) = CurY(Pos)
Explode17X(Pos) = FirePosX(Pos)
Explode17Y(Pos) = CurY(Pos)
Explode18X(Pos) = FirePosX(Pos)
Explode18Y(Pos) = CurY(Pos)
Explode19X(Pos) = FirePosX(Pos)
Explode19Y(Pos) = CurY(Pos)
Explode20X(Pos) = FirePosX(Pos)
Explode20Y(Pos) = CurY(Pos)
Explode21X(Pos) = FirePosX(Pos)
Explode21Y(Pos) = CurY(Pos)
Explode22X(Pos) = FirePosX(Pos)
Explode22Y(Pos) = CurY(Pos)
Explode23X(Pos) = FirePosX(Pos)
Explode23Y(Pos) = CurY(Pos)
Explode24X(Pos) = FirePosX(Pos)
Explode24Y(Pos) = CurY(Pos)
Explode25X(Pos) = FirePosX(Pos)
Explode25Y(Pos) = CurY(Pos)
Explode26X(Pos) = FirePosX(Pos)
Explode26Y(Pos) = CurY(Pos)
Explode27X(Pos) = FirePosX(Pos)
Explode27Y(Pos) = CurY(Pos)
Explode28X(Pos) = FirePosX(Pos)
Explode28Y(Pos) = CurY(Pos)
Explode29X(Pos) = FirePosX(Pos)
Explode29Y(Pos) = CurY(Pos)
Explode30X(Pos) = FirePosX(Pos)
Explode30Y(Pos) = CurY(Pos)
Explode31X(Pos) = FirePosX(Pos)
Explode31Y(Pos) = CurY(Pos)
Explode32X(Pos) = FirePosX(Pos)
Explode32Y(Pos) = CurY(Pos)
Explode33X(Pos) = FirePosX(Pos)
Explode33Y(Pos) = CurY(Pos)
Explode34X(Pos) = FirePosX(Pos)
Explode34Y(Pos) = CurY(Pos)
Explode35X(Pos) = FirePosX(Pos)
Explode35Y(Pos) = CurY(Pos)
Explode36X(Pos) = FirePosX(Pos)
Explode36Y(Pos) = CurY(Pos)
Explode37X(Pos) = FirePosX(Pos)
Explode37Y(Pos) = CurY(Pos)
Explode38X(Pos) = FirePosX(Pos)
Explode38Y(Pos) = CurY(Pos)
Explode39X(Pos) = FirePosX(Pos)
Explode39Y(Pos) = CurY(Pos)
Explode40X(Pos) = FirePosX(Pos)
Explode40Y(Pos) = CurY(Pos)
Explode41X(Pos) = FirePosX(Pos)
Explode41Y(Pos) = CurY(Pos)
Explode42X(Pos) = FirePosX(Pos)
Explode42Y(Pos) = CurY(Pos)
Explode43X(Pos) = FirePosX(Pos)
Explode43Y(Pos) = CurY(Pos)
Explode44X(Pos) = FirePosX(Pos)
Explode44Y(Pos) = CurY(Pos)
Explode45X(Pos) = FirePosX(Pos)
E